package main.Q2701_2800;

import java.util.Arrays;

public class Q2701_2710 {
	public static void main(String[] args) {
		System.out.println("Question2701：");
		System.out.println("Question2702：");
		System.out.println("Question2703：");
		System.out.println("Question2704：");
		System.out.println("Question2705：");
		System.out.println("Question2706：购买两块巧克力");
		System.out.println("Question2707：");
		System.out.println("Question2708：");
		System.out.println("Question2709：");
		System.out.println("Question2710：");
	}
}

class Question2706 {
	public int buyChoco(int[] prices, int money) {
		Arrays.sort(prices);
		int total = prices[0] + prices[1];
		return total > money ? money : money - total;
	}
}